<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  用户名: <input onblur="checkUsername" placeholder="请输入用户名" id="username" />
  <button class="ofo"> True</button>


</body>

</html>
<script >
  
  function $(fas){return document.querySelector(fas)}
  let sume=0
  let timer
  function Dateset(){
    console.log(sume++);
    clearTimeout(timer);
    timer= setTimeout(()=>{
      console.log(`请求发送`);
    },4000)
  }

  $('.ofo').onclick=()=>{
    Dateset()
  }

</script>